feat(create-release-pr): aggregate RC changelogs when promoting to stable#239
Closed
piontec wants to merge 2 commits into
Closed
feat(create-release-pr): aggregate RC changelogs when promoting to stable#239piontec wants to merge 2 commits into
piontec wants to merge 2 commits into
Conversation
…able On an RC->stable promotion, the stable version's CHANGELOG section now aggregates all changes from its release-candidate entries (oldest->newest) plus any Unreleased delta, merged by Keep a Changelog category, with a note under `### Changed`. A GitHub release page shows only that version's own section, so the promoted stable release now lists the full change set instead of the (often empty) delta left after the RCs were cut. The change is a no-op for RC releases and for stable releases with no matching RC entries, and is idempotent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
uvegla
approved these changes
Jul 9, 2026
…gelog content Harden the RC-changelog aggregation step from PR review: - Error out if the '## [<version>]' stable header is absent, instead of committing an unchanged changelog while logging success (the splice would otherwise discard the merged body silently). - Guard against a non-Keep-a-Changelog H3 in the 'Unreleased' delta, which validate-changelog.yaml never gates: the category merge would drop it silently, so now fail and name the offending heading. - Make extract_section skip leading and trim trailing blank lines so it genuinely mirrors create-release.yaml's extractor, as its comment claims. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
Maybe there is a better place for this logic in |
Contributor
Author
|
Superseded by giantswarm/architect#1379, which moves this RC-changelog aggregation into the Once architect ships the change, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When promoting a release candidate to a stable release, the stable version's
CHANGELOG.mdsection now aggregates the changelogs of all its release candidates (oldest → newest) plus anyUnreleaseddelta, merged by Keep a Changelog category, with a note under### Changed.Why
A GitHub release page shows only that version's own changelog section. On an RC → stable promotion,
architect prepare-releasemoves just theUnreleaseddelta into## [X.Y.Z]— which is usually empty, since all the real changes were already recorded under the## [X.Y.Z-rc.N]sections. That left the promoted stable release (the one users see as "Latest release", since RCs are marked as pre-releases) showing an empty or near-empty changelog, and it also trippedvalidate-changelog.yaml's "Empty Changelog" check.How
A new step, "Aggregate release-candidate changelogs on promotion", runs in the
create_release_prjob immediately afterarchitect prepare-releaseand before the existing commit/push:is_rc == 'false') andCHANGELOG.mdalready contains## [X.Y.Z-rc.N]entries for the same core version. Works for#rc-release, an explicit#vX.Y.Z, etc.Unreleaseddelta (on top) and every RC section (oldest → newest, ordered withsort -V) into a single set of Keep-a-Changelog H3 sections.### Changed— "This release aggregates all changes from release candidate(s) X.Y.Z-rc.1 through X.Y.Z-rc.N."## [Unreleased]heading are left untouched.The existing commit/push carries the result into the release PR, and
create-release.yamlreads that same section verbatim for the GitHub release body — no change needed there.validate-changelog.yamlalso needs no change: the merged section always has content, so it passes as-is.No-op / safe cases: RC releases, stable releases with no matching RC entries (a genuinely empty release still correctly fails validation), and re-runs (idempotent — skips if the note is already present).
Testing
sort -Vordering (rc.1/rc.2/rc.10), and empty-stable + single RC — all produce the expected output and pass a faithful replica of thevalidate-changelog.yamlcontent check.yamllint(repo config) and YAML parse pass.🤖 Generated with Claude Code